<?php
App::uses('AppController', 'Controller');

/**
 *author quoctran
 * 
 */
class DetailsController extends AppController {
	var $name = "Details";// ten cua Controller
    var $helpers = array('Paginator','Html');
    var $components = array('Session', 'Link');
	public function beforeFilter() {
		parent::getTopic();
		$this -> Auth -> allow(array('index'));
	}

	/**
	 * index method
	 */
	public function index($id) {
		$this -> loadModel('Post');
		$conditions = array("Post.id" => $id);
        $data = $this->Post-> find('first', array('conditions' =>$conditions));
		//echo $id."<pre>";
		//print_r($data);exit();
        $this->set("data",$data);
		$this->set("strTitle","Bài viết");
	}
}
?>